const { defineConfig } = require('@vue/cli-service')

module.exports = defineConfig({
  transpileDependencies: true,
  configureWebpack: {
    resolve: {
      alias: {
        'assets': '@/assets',
        'components': '@/components',
        'views': '@/views',
      }
    }
  },
  publicPath: process.env.NODE_ENV === 'production' ? './' : '/',
  outputDir: 'dist',
  assetsDir: 'static',
  productionSourceMap: false,
  lintOnSave: false,
  pluginOptions:{
    electronBuilder:{
      builderOptions:{
        win:{
          //配置打包方式
          target:"nsis",
          icon:'public/logo.ico',
          requestedExecutionLevel:'requireAdministrator'
        },
        nsis:{
          oneClick:false,//是否一键安装
          allowToChangeInstallationDirectory:true,//开启自定义安装目录,
          createDesktopShortcut:true,
          installerIcon:'public/logo.ico',
          uninstallerIcon:'public/logo.ico',
          installerHeaderIcon:'public/logo.ico',
          installerHeader:'public/logo.ico',
          shortcutName:'密码管理器',
          createStartMenuShortcut:true,
          allowElevation:true
        }
      },
      nodeIntegration:true,
      productName:'密码管理器',
      appId:'com.github.codewarning',
      copyright:'Codewarning',
    }
  }
})

